Repository navigation
docs: readme 설명 보완 nginx.conf 수정 시 inode 유지 - #113
Merged
Merged
Conversation
실행 중 nginx.conf 는 nginx 컨테이너에 단일 파일 bind mount 되어 있어 sed -i 로 수정하면 inode 가 바뀌어 reload 해도 반영되지 않는다. 수정본을 cat > 로 덮어써 inode 를 유지한 뒤 reload 하도록 절차를 바꾸고, nginx -T 로 적용값을 확인하는 단계와 sed -i 를 이미 쓴 경우 restart 안내를 추가한다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
README / README_kr Known Issues 에 "504 가 계속 나면
proxy_read_timeout을 올리고 reload" 절차를 넣었는데, 실행 중nginx.conf를sed -i로 고치는 방식이었습니다.docker-compose.yaml402행에서 이 파일은 nginx 컨테이너에 단일 파일 bind mount 됩니다.sed -i는 새 파일을 만들어 교체(inode 변경)하므로 컨테이너는 옛 inode 를 계속 보고,nginx -s reload해도 반영되지 않습니다. 11-09 stage 반영 때도cat 임시파일 > nginx.conf(inode 유지) 후 reload 로 처리했습니다.변경
sed결과를 임시 파일로 만든 뒤cat > nginx.conf로 덮어써 inode 유지 →nginx -t && nginx -s reloaddocker exec mc-iam-manager-nginx nginx -T | grep proxy_read_timeout로 적용값 확인sed -i로 고쳤다면 reload 대신docker restart mc-iam-manager-nginxnginx.template*.conf)은 이미 120s 라 변경 없음